-- GENERATED SPELL FOR [Scholomance Acolyte] --


function spell0_10471(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10471', 18000, 1)
end

function spell1_10471(pUnit, Event) --@Dark Mending,Heal--
pUnit:FullCastSpellOnTarget(17613,pUnit)
pUnit:RegisterEvent('Sorts_10471', 3500, 1)
end

function spell2_10471(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(17615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10471', 628, 1)
end

function spell3_10471(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(17165,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10471', 3000, 1)
end

function spell4_10471(pUnit, Event) --@Shadowform,Self--
pUnit:FullCastSpellOnTarget(16592,pUnit)
pUnit:RegisterEvent('Sorts_10471', 610, 1)
end

function Sorts_10471(pUnit, Event)
local choix_sorts_10471 = math.random(0, 4)
if choix_sorts_10471 == 0 then
pUnit:RegisterEvent('spell0_10471', 1, 1)
end
if choix_sorts_10471 == 1 then
pUnit:RegisterEvent('spell1_10471', 1, 1)
end
if choix_sorts_10471 == 2 then
pUnit:RegisterEvent('spell2_10471', 1, 1)
end
if choix_sorts_10471 == 3 then
pUnit:RegisterEvent('spell3_10471', 1, 1)
end
if choix_sorts_10471 == 4 then
pUnit:RegisterEvent('spell4_10471', 1, 1)
end
end

function mob10471_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10471', math.random(1500, 3000), 1)
end

function mob10471_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10471_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10471_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10471, 1, 'mob10471_Action')
RegisterUnitEvent(10471, 2, 'mob10471_Leave')
RegisterUnitEvent(10471, 3, 'mob10471_Kill')
RegisterUnitEvent(10471, 4, 'mob10471_Die')
